#!/bin/bash

# Extracted from: http://mywiki.wooledge.org/BashFAQ/071

#------------------------------------------------------------------------------
# Arguments:
#   * Decimal representation of the character
function chr() {
  printf \\$((${1}/64))$(((${1}/8)%8))$((${1}%8))
}
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Arguments:
#   * Character
function ord() {
  printf '%d' "'${1}"
}
#------------------------------------------------------------------------------
